﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using elibrary.Classes;

namespace elibrary.Models.Entities
{
    public class Feedback
    {
        /* Class Fields [Start] ----------------------------------------------------------------- */
        [Key]
        public int id { get; set; }
        public string name { get; set; }
        public DateTime dateAdded { get; set; }
        public string email { get; set; }
        public string message { get; set; }
        /* Class Fields [End] ------------------------------------------------------------------- */

        /* Computed Fields [Start] -------------------------------------------------------------- */
        public Dictionary<string,object> clientRichObject
        {
            get { this.toClientRichObject(); }
        }
        /* Computed Fields [End] ---------------------------------------------------------------- */

        private Dictionary<string,object> toClientRichObject()
        {
            return Utilities.getClientRichObject(new string[]{"id","dateAdded","name","email",
                "message"}, this);
        }
    }
}